﻿using System;
using System.Data.Common;
using ApplicationLibrary.DBManager;
using ApplicationLibrary.SqlConnector;

namespace Vintner.Database
{
    #region VI_Customers
    public class VI_Customers : Table
    {
        public static string Name = "VI_Customers";

        public static Column Customer = new Column(Name, global::Vintner.Properties.Resources.T_Customer, "Customer", typeof(System.String), 16, "");
        public static Column CompanyName = new Column(Name, global::Vintner.Properties.Resources.T_CompanyName, "Description", typeof(System.String), 64, "");
        public static Column Address = new Column(Name, global::Vintner.Properties.Resources.T_Address, "Address", typeof(System.String), 64, "");
        public static Column ZipCode = new Column(Name, global::Vintner.Properties.Resources.T_ZipCode, "ZipCode", typeof(System.String), 5, "");
        public static Column City = new Column(Name, global::Vintner.Properties.Resources.T_City, "City", typeof(System.String), 35, "");
        public static Column County = new Column(Name, global::Vintner.Properties.Resources.T_County, "County", typeof(System.String), 2, "");

        public static Column Phone1 = new Column(Name, global::Vintner.Properties.Resources.T_Phone1, "Phone1", typeof(System.String), 11, "");
        public static Column Phone2 = new Column(Name, global::Vintner.Properties.Resources.T_Phone2, "Phone2", typeof(System.String), 11, "");
        public static Column Fax = new Column(Name, global::Vintner.Properties.Resources.T_Fax, "Fax", typeof(System.String), 10, "");
        public static Column Refer1 = new Column(Name, global::Vintner.Properties.Resources.T_Refer1, "Refer1", typeof(System.String), 35, "");
        public static Column Refer2 = new Column(Name, global::Vintner.Properties.Resources.T_Refer2, "Refer2", typeof(System.String), 35, "");

        public static Column Blocked = new Column(Name, global::Vintner.Properties.Resources.T_Blocked, "Blocked", typeof(System.Boolean), 0, "0");
        public static Column Disabled = new Column(Name, global::Vintner.Properties.Resources.T_Disabled, "Disabled", typeof(System.Boolean), 0, "0");

        public static Column DestGoods1 = new Column(Name, global::Vintner.Properties.Resources.T_DestGoods1, "DestGoods1", typeof(System.String), 64, "");
        public static Column DestGoods2 = new Column(Name, global::Vintner.Properties.Resources.T_DestGoods2, "DestGoods2", typeof(System.String), 64, "");

        public static Column TaxNo = new Column(Name, global::Vintner.Properties.Resources.T_TaxNo, "TaxNo", typeof(System.String), 11, "");
        public static Column FiscalCode = new Column(Name, global::Vintner.Properties.Resources.T_FiscalCode, "FiscalCode", typeof(System.String), 16, "");

        public VI_Customers()
        {
            VisibleInRadar(new Column[] { Customer, CompanyName });
            Tablename = Name;
            ForeignKey = Customer.Name;
        }
    } 
    #endregion
    #region VI_Items
    public class VI_Items : Table
    {
        public static string Name = "VI_Items";

        public static Column Item = new Column(Name, global::Vintner.Properties.Resources.T_Item, "Item", typeof(System.String), 21, "");
        public static Column Description = new Column(Name, global::Vintner.Properties.Resources.T_Description, "Description", typeof(System.String), 64, "");
        public static Column Size = new Column(Name, global::Vintner.Properties.Resources.T_Size, "Size", typeof(System.Decimal), 2, 1, "0");
        public static Column Disabled = new Column(Name, global::Vintner.Properties.Resources.T_Disabled, "Disabled", typeof(System.Boolean), 0, "0");

        public VI_Items()
        {
            VisibleInRadar(new Column[] { Item, Description });
            Tablename = Name;
            ForeignKey = Item.Name;
        }
    }
    #endregion
    #region VI_ItemsPrice
    public class VI_ItemsPrice : Table
    {
        public static string Name = "VI_ItemsPrice";

        public static Column Item = new Column(Name, global::Vintner.Properties.Resources.T_Item, "Item", typeof(System.String), 21, "");
        public static Column Category = new Column(Name, global::Vintner.Properties.Resources.T_Category, "Category", typeof(System.String), 15, "");
        public static Column Price = new Column(Name, global::Vintner.Properties.Resources.T_Price, "Price", typeof(System.Decimal), 10, 2, "0");
        public static Column TaxCode = new Column(Name, global::Vintner.Properties.Resources.T_TaxCode, "TaxCode", typeof(System.Int32), 0, "0");
        public static Column Disabled = new Column(Name, global::Vintner.Properties.Resources.T_Disabled, "Disabled", typeof(System.Boolean), 0, "0");
    }
    #endregion
    #region VI_ItemCustomerPrice
    public class VI_ItemCustomerPrice : Table
    {
        public static string Name = "VI_ItemCustomerPrice";
        public static Column Item = new Column(Name, global::Vintner.Properties.Resources.T_Item, "icp_Item", typeof(System.String), 21, "");
        public static Column Description = new Column(Name, global::Vintner.Properties.Resources.T_Description, "icp_Description", typeof(System.String), 64, "");
        public static Column Customer = new Column(Name, global::Vintner.Properties.Resources.T_Customer, "icp_Customer", typeof(System.String), 16, "");
        public static Column Category = new Column(Name, global::Vintner.Properties.Resources.T_Category, "icp_Category", typeof(System.String), 15, "");
        public static Column Price = new Column(Name, global::Vintner.Properties.Resources.T_Price, "icp_Price", typeof(System.String), 15, "0");
       // public static Column TaxCode = new Column(Name, global::Vintner.Properties.Resources.T_TaxCode, "icp_TaxCode", typeof(System.Int32), 0, "0");
        public static Column Disabled = new Column(Name, global::Vintner.Properties.Resources.T_Disabled, "icp_Disabled", typeof(System.Boolean), 0, "0");
    }
    #endregion


    #region VI_SaleInvoice
    public class VI_SaleInvoice : Table
    {
        public static string Name = "VI_SaleInvoice";

        public static Column InvoiceNo = new Column(Name, global::Vintner.Properties.Resources.T_Item, "InvoiceNo", typeof(System.String), 21, "");
        public static Column Date    = new Column(Name, global::Vintner.Properties.Resources.T_Date, "Date", typeof(System.DateTime));
        public static Column Customer = new Column(Name, global::Vintner.Properties.Resources.T_Customer, "Customer", typeof(System.String), 16, "");
        public static Column Payment = new Column(Name, global::Vintner.Properties.Resources.T_Payment, "Payment", typeof(System.String), 35, "");

        public VI_SaleInvoice()
        {
            VisibleInRadar(new Column[] { InvoiceNo, Date, Customer });
            Tablename = Name;
            ForeignKey = InvoiceNo.Name;
        }
    }
    #endregion

}
